<script setup lang="ts">
import {PAY_TYPE} from "~/const/Maps";
definePageMeta({
  title:'一口价域名列表',
  layout:'admin'
})
const time=ref([]);
const form=reactive({
  limit:20,
  page:1,
  domain:'',//模糊搜索-域名
});
const {data:list,refresh}=await useServerGet('/backend/fp/getList',form)
const search=()=>{
  refresh&&refresh();
}
</script>

<template>
<div>
  <el-card>
    <div class="flex">
      <div class="w-52 mr-2">
        <el-input placeholder="请输入域名" v-model="form.domain" class="w-40" clearable></el-input>
      </div>
      <div class="w-20">
        <el-button type="primary" @click="search">搜索</el-button>
      </div>
    </div>
  </el-card>
  <el-card class="mt-4">
    <el-table :data="list.data.list" :header-cell-style="{'text-align':'center'}" :cell-style="{'text-align':'center'}" class="h-[620px] overflow-auto">
      <el-table-column prop="id" label="ID"></el-table-column>
      <el-table-column prop="domain" label="域名" min-width="200">
        <template #default="{row}">
          <div class="flex">
            {{row.domain}}
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="price" label="价格"></el-table-column>
      <el-table-column prop="user_phone" label="手机号"></el-table-column>
      <el-table-column prop="register_time" label="注册时间"></el-table-column>
      <el-table-column prop="expiration_time" label="到期时间"></el-table-column>
      <el-table-column prop="updated_at" label="更新时间"></el-table-column>
      <el-table-column prop="created_at" label="创建时间"></el-table-column>
    </el-table>

    <MyPage v-model:page="form.page" v-model:perpage="form.limit" v-model:total="list.data.total" @change="refresh"></MyPage>
  </el-card>
</div>
</template>

<style scoped lang="scss">

</style>